import { createRouter, createWebHashHistory } from 'vue-router';
import Login from '../views/Login';
import Publish from '../views/Publish';
import Friend from '../views/Friend';
import Home from '../views/Home';
import Find from '../views/Find';
import My from '../views/My';
import Search from '../views/Search';
import Detail from '../views/Detail';

export default createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login,
      meta: { layout: false, noBg: true }
    },
    {
      path: '/publish',
      name: 'Publish',
      component: Publish,
      meta: { layout: true, noBg: false }
    },
    {
      path: '/friend',
      name: 'Friend',
      component: Friend,
      meta: { layout: true, noBg: false }
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      meta: { layout: true, noBg: false }
    },
    {
      path: '/find',
      name: 'Find',
      component: Find,
      meta: { layout: true, noBg: false }
    },
    {
      path: '/my',
      name: 'My',
      component: My,
      meta: { layout: true, noBg: false }
    },
    {
      path: '/search',
      name: 'Search',
      component: Search,
      meta: { layout: false, noBg: false }
    },
    {
      path: '/detail',
      name: 'Detail',
      component: Detail,
      meta: { layout: false, noBg: false }
    }
  ]
});
